package com.cn.study008;

import java.util.Scanner;

/**
 * @author lw
 * @ClassName Test8009.java
 * @Description
 * @createTime 2023年05月14日 18:03:00
 */
public class Test8009 {
    public static void main(String[] args) {

        Scanner sc=new Scanner(System.in);
        String[] str=new String[5];
        System.out.println("请输入5句话：");
        for (int i = 0; i < str.length; i++) {
            System.out.print("第"+(i+1)+"句话：");
            str[i]=sc.next();
        }
        System.out.println("\n逆序输出5句话为：");
        for (int i = str.length-1; i>=0; i--) {
            System.out.println(str[i]);
        }
    }
}
